Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adagio*: add adagioUtils.js and remove duplicated code #11849

Conversation

osazos
Copy link
Collaborator

@osazos osazos commented Jun 20, 2024

Type of change

  • Refactoring (no functional changes, no api changes)

Description of change

Continue Adagio refactoring, guide lines compliance.

Add a libraries/adagioUtils and remove duplicated code between the adagioBidAdapter and adagioRtdProvider.

Please note that adagioAnalyticsAdapter is not part of this PR but will be addressed shortly.

Other information

This PR is related to this comment: #11772 (comment)

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. Keep up the great work! 🚀

@osazos
Copy link
Collaborator Author

osazos commented Jun 20, 2024

ah ah so much duplicated code anywhere :D

  • code related to openRTB video params validation should be moved indeed, I started something but it implies few modifications in core libraries and it sounds better to open a new PR especially for this and updates a lot of adapters.
  • For the duplicated part in Native functions, I can't address it right now. I planed a refactoring of Native support for the adagio bid adapter relying on the ortb2 method but it is not ready on the backed side.

@patmmccann
Copy link
Collaborator

great job thanks!

@patmmccann patmmccann self-requested a review June 20, 2024 19:01
@patmmccann patmmccann self-assigned this Jun 20, 2024
@patmmccann
Copy link
Collaborator

awesome to see duplicated code consolidating. As we find these across the project it will be so much easier to maintain

@patmmccann patmmccann merged commit 0ee1ba7 into prebid:master Jun 20, 2024
3 of 5 checks passed
@osazos osazos deleted the chore/sc-13654/move-duplicated-code-between-adagiobidadapter branch June 21, 2024 12:02
DecayConstant pushed a commit to mediavine/Prebid.js that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants